<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head>
		<!-- Title here -->
		<!-- Javascript files -->
		<!-- jQuery -->
		<script src="/thinkphp1/Public/js/jquery.js"></script>
		<!-- Bootstrap JS -->
		<script src="/thinkphp1/Public/js/bootstrap.min.js"></script>
		<!-- jquery Anchor JS -->
		<script src="/thinkphp1/Public/js/jquery.arbitrary-anchor.js"></script>
		<!-- jQuery way points -->
		<script src="/thinkphp1/Public/js/waypoints.min.js"></script>
		<!-- Respond JS for IE8 -->
		<script src="/thinkphp1/Public/js/respond.min.js"></script>
		<!-- HTML5 Support for IE -->
		<script src="/thinkphp1/Public/js/html5shiv.js"></script>
		<!-- Custom JS -->
		<script src="/thinkphp1/Public/js/custom.js"></script>
		<meta  charset="utf-8" />

		<title>detail</title>
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
		<link href="/thinkphp1/Public/Css/bootstrap.min.css" rel="stylesheet">
		<!-- Font awesome CSS -->
		<link href="/thinkphp1/Public/Css/font-awesome.min.css" rel="stylesheet">	
		<!-- Animate CSS -->
		<link href="/thinkphp1/Public/Css/animate.min.css" rel="stylesheet">
		<!-- Custom CSS -->
		<link href="/thinkphp1/Public/Css/style.css" rel="stylesheet">	
	</head>
	<body>
		<div class="outer">
			<!-- Sidebar Start-->
			<!-- Menu for tablets and mobile -->
			<div class="navigation">
				<a href="#">Menu</a>
			</div>
			
			<div class="sidebar">
				<!-- Logo of company -->
				<div class="logo text-center">
					<h1><a href="<?php echo U('Index/index');?>">WEAK</a></h1>
					<p>Team of WEAK</p>
				</div>
				
				<!-- Navigation menu list -->
				
	<ul class="list-unstyled list">
		<?php if(empty($login)): ?><li>
			<a href="<?php echo U('login');?>" class="anchorLink"><i class="icon-road scolor"></i>登录</a>
			</li>
			<li>
			<a href="<?php echo U('reg');?>" class="anchorLink"><i class="icon-road scolor"></i>注册</a>
			</li>
			<?php else: ?>
			<li>
			<a href="<?php echo U('User/index',['id'=>$login['id']]);?>" style="text-transform:none;"><i class="icon-road scolor"></i><span style="color:#fff;">欢迎<?php echo ($login['name']); ?></span></a>
			</li>
			<li>
			<a href="<?php echo U('loginout');?>" class="anchorLink"><i class="icon-road scolor"></i>退出</a>
			</li><?php endif; ?>
		<li><a href="<?php echo U('index');?>" class="anchorLink"><i class="icon-home scolor"></i>主页</a></li>
	</ul>

		</div>
		
			
			<!-- Sidebar End -->
			
			<!-- Main Start -->
			
			<div class="main">
			
				<div id="carousel-example-generic" class="carousel slide carousel-fade">
				   
					<!-- Wrapper for slides -->
					
	<div class="carousel-inner">
		<img src="/thinkphp1<?php echo ($list['giname']); ?>" width="300px" height="410px"  alt="" style="display:block;margin-top:20px;margin-left:200px; float:left;">
		<div style="width:300px;margin-left:550px;margin-top:25px;">
			<form action="<?php echo U('Order/cart',['id'=>$list['gid']]);?>" method="post"> 
				<span style="font-size:18px;">商品名:<?php echo ($list['gname']); ?></span>
				<h2>￥:<span style="color:red;" ><?php echo ($list['gp']); ?></span></h2>
				<span style="font-size:18px;">样式:</span>
				<br/>
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<img src="/thinkphp1<?php echo ($list['giname']); ?>" width="70px" height="70px"  alt="" >
				<br/>
				<br/>
				<span style="font-size:18px;">分类:<?php echo ($list['cname']); ?></span>
				<br/>
				<br/>
				<span style="font-size:18px;">库存:<input type="text" name="gk" value="<?php echo ($list['gk']); ?>"  style="width:50px;" readonly/></span>
				<br/>
				<br/>
				<button onclick="return false" style="width:100px;height:40px;border:none;background:#00A5A5;">购买数量:</button>
				<button onclick="return plus()" style="width:40px;height:40px;border:none;background:#ccc;">-</button>
				<input id="num" name="num" style="width:40px;height:40px;" type="text" value="1">
				<button onclick="return minus()"  style="width:40px;height:40px;border:none;background:#ccc;">+</button>
				<br/>
				<br/>
				<button type="submit" style="width:200px;height:40px;border:none;background:#DB453E;">加入购物车</button>
				
			</form>	
				<script>
					//jian
					function plus(){
						var num = document.getElementById('num');
						num1=parseInt(num.value)-1;
						if(num1<=0)
						{
							num1=1;
						}
						num.value=num1;
						return false;
					}
					function minus(){
						var num = document.getElementById('num');
						num1=parseInt(num.value)+1;
						num.value=num1;
						return false;
					}
				</script>
		</div>
	</div>

				<!-- Wrapper for slides End -->
				
				
				
				<div class="container">
				
					<!-- Start Hero -->
					
					<div class="hero">
						<div class="row">
								<h2>WE TEAM</h2>
								<p>一个新生的团队，年纪很轻，能力很强，笑点很低，效率很高的团队.</p>
						</div>
					</div>
					<hr />
					
					<!-- Hero End -->
					
					<!-- Start team profile -->
					<div class="team">
						<a href="<?php echo U('more',['hot'=>1]);?>"><h3>热销商品</h3></a>
						<div class="bor hidden-xs"></div>
						<div class="row">
							<?php if(is_array($hotlist)): foreach($hotlist as $key=>$val): ?><div class="col-md-3 col-sm-6">
									<!-- Team member's profile  -->
									<div class="thumbnail team-profile">
										<a href="<?php echo U('detail',['id'=>$val['gid']]);?>"><img src="/thinkphp1<?php echo ($val['giname']); ?>"  alt="" class="img-responsive img-circle" />
										</a>
										<!-- Member's name and designation -->
										<h5>商品名:<?php echo ($val['gname']); ?></h5>
										<h5>分类:<?php echo ($val['cname']); ?></h5>
										<span>价格:<?php echo ($val['gp']); ?></span>
									</div>
								</div><?php endforeach; endif; ?>
						</div>	
					</div>
					<hr />
					
					<!-- Team profile End --> 
						
					<!-- Services start -->
					<div class="service">
						<a href="<?php echo U('more',['new'=>1]);?>"><h3>新品</h3></a>
						<div class="bor hidden-xs"></div>
						<div class="row">
							<?php if(is_array($newlist)): foreach($newlist as $key=>$value): ?><div class="col-md-3 col-sm-6">
									<!-- Team member's profile  -->
									<div class="thumbnail team-profile">
										<a href="<?php echo U('detail',['id'=>$value['gid']]);?>"><img src="/thinkphp1<?php echo ($value['giname']); ?>"  alt="" class="img-responsive img-circle" />
										</a>
										<!-- Member's name and designation -->
										<h5>商品名:<?php echo ($value['gname']); ?></h5>
										<h5>分类:<?php echo ($value['cname']); ?></h5>
										<span>价格:<?php echo ($value['gp']); ?></span>

									</div>
								</div><?php endforeach; endif; ?>
						</div>
					</div>
					
					<!-- Testimonials End -->
					
					
					<!-- Price Table End -->
					
					<!-- Contact Start -->
					
			
							<!-- Address -->
							
					<!-- Contact End -->
					
					<!-- Footer -->
				<footer>
					<div class="row">
						<div class="col-md-12">
							<hr />
							<br />
							<!-- You should not remove the footer link back. -->
							<p class="text-center">CNIT &copy; by CNIT.PRO  </p>
							<br />
						</div>
					</div>
				</footer>
				
				</div>
				
				
				
			</div>	<!-- This end div for main class -->
		</div>
		
		<div class="clearfix"></div>
		
		
		<!-- Scroll to top -->
      <span class="totop"><a href="#"><i class="icon-chevron-up"></i></a></span> 
	<div style="text-align:center;">
<p>来源：<a href="" target="_blank">源码之家</a></p>
</div>
</body>
</html>